#include<stdio.h>
#include<stdlib.h>
#include<malloc.h>
#include <stdbool.h>



sort_test()
{

    int len=7;

    int   a[7]= {11,26,33,144,55,-1,-111};
    quickSort(a,0,len-1);
    int i;
    for(i=0; i<len; i++)
    {
        printf("%d\t",a[i]);

    }
}

quickSort(int * a,int low,int high)
{

    if(low<high)
    {
        int pos= findPos(a,low,high);
        quickSort(a,low,pos-1);
        quickSort(a,pos+1,high);
    }




}


int findPos(int* a,int low,int high)
{
    int val=a[low];
    while(low<high)
    {
        while(low<high && a[high]>=val)
            --high;
        a[low]=a[high];

        while(low<high && a[low]<=val)
            ++low;
        a[high]=a[low];

    }
    a[low]=val;
    return low;

}
